package com.zfzs.post.modules.transaction.service.mybatis.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zfzs.post.modules.transaction.service.mapper.mybatis.BenefitDayDao;
import com.zfzs.post.modules.transaction.domain.BenefitDay;
import com.zfzs.post.modules.transaction.service.dto.BenefitDay4MineDTO;
import com.zfzs.post.modules.transaction.service.mybatis.IbatisBenefitDayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author wq
 * @date 2019/10/28 10:29
 * @description
 */
@Service("ibatisBenefitDayService")
public  class IbatisBenefitDayServiceImpl extends ServiceImpl<BenefitDayDao,BenefitDay> implements IbatisBenefitDayService {

    @Autowired
    private BenefitDayDao benefitDayDao;

    @Override
    public List<BenefitDay4MineDTO> findMineDetail(Long agentId, Integer isSelf, String startDate, String endDate, Integer start, Integer pageSize) {
        List<BenefitDay4MineDTO> mineDetail = benefitDayDao.findMineDetail(agentId, isSelf, startDate, endDate, start, pageSize);
        return mineDetail;
    }

    @Override
    public BigDecimal findTeamBenefitByAgentId(Long agentId, String month) {
        return benefitDayDao.findTeamBenefitByAgentId(agentId,month);
    }

    @Override
    public BigDecimal findSelfBenefitByAgentId(Long agentId, String month) {
        return benefitDayDao.findSelfBenefitByAgentId(agentId,month);
    }
}
